home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / ss / readws13.zip / LOOP.BAT < prev    next >
DOS Batch File  |  1992-05-07  |  925b  |  32 lines

  1. @Echo Off
  2.   Echo . 
  3.   Echo *===[ Loop.Bat copyright 1992 Mountain Software ]===*
  4.   Echo . 
  5.   Echo Loop.Bat will execute Read_WKS for each file meeting the supplied filespec
  6.   Echo Use this batch file extract data from a group of worksheet files.
  7.   Echo .
  8.   Echo Example:
  9.   Echo . 
  10.   Echo LOOP A1..D10 *.WK1 CONSOL.PRN
  11.   Echo . 
  12.   Echo will run Read_WKS for each file in the current directory matching the filespec
  13.   Echo *.WK1 for the range A1..D10 and all extracted data will be appended to the file
  14.   Echo CONSOL.PRN
  15.   Echo . 
  16.   Echo Press Ctrl-C to cancel or
  17.   Pause
  18. :Start
  19.   If [%3]==[] GoTo Usage
  20.   If Not Exist %2 GoTo NoFiles
  21.   For %%f In (%2) Do READ_WKS /E /R%1 %%f %3
  22.   Echo Done
  23.   GoTo End
  24. :NoFiles
  25.   Echo No files found matching filespec %2
  26.   Goto End
  27. :Usage
  28.   Echo Error...
  29.   Echo Usage:    LOOP [range] [filespec] [output file]
  30.   Echo Example: LOOP A1..D10 *.WK1 CONSOL.PRN
  31. :End
  32.